import http from '@/service/http'
import type { getApiConfigState } from '@/types/baseConfig'
const getApi = async (config: getApiConfigState, params: any) => {
  let res: any = {}
  if (config.method === 'get') {
    res = await http.get(config.api, params)
  } else if (config.method === 'post') {
    res = await http.post(config.api, params)
  }
  return res
}
export default getApi
